<template>
  <div>
    <div class="side_bar">
      <ul class="sidebar_top">
        <li>
          <i class="fa fa-ravelry" aria-hidden="true"></i>
          <span>感兴趣</span>
        </li>
        <li>
          <i class="fa fa-user-circle-o" aria-hidden="true"></i>
          <span>沟通过</span>
        </li>
        <li>
          <i class="fa fa-user-circle-o" aria-hidden="true"></i>
          <span>已投递</span>
        </li>
        <li>
          <i class="fa fa-address-card-o" aria-hidden="true"></i>
          <span>面试</span>
        </li>
        <li></li>
      </ul>
      <ul class="sidebar_bottom">
        <li>
          <i class="fa fa-chevron-up" aria-hidden="true" @click="ClickBackTop"></i>
        </li>
        <li>
          <span>反馈</span>
        </li>
        <li>
          <span>微信</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SideBar',
  data () {
    return {}
  },
  methods: {
    ClickBackTop () {
      document.documentElement.scrollTop = 0
    }
  }
}
</script>

<style lang="scss" scoped>
.side_bar {
  width: 40px;
  height: 100%;
  background-color: #ffffff;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: .1s width linear;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 20;

  &:hover {
    width: 60px;
    cursor: pointer;

    &.side_bar span {
      opacity: 1;
    }
  }

  .sidebar_top, .sidebar_bottom {
    width: 100%;
    height: 40%;
    text-align: center;

    li {
      padding: 10px 0;

      &:hover {
        i {
          color: #8cc5ff;
        }

        span {
          color: #8cc5ff;
        }
      }

      span {
        display: block;
        font-size: 11px;
        margin-top: 8px;
        color: #cccccc;
        opacity: 0;
      }
    }

    i {
      color: #cccccc;
    }
  }

  .sidebar_bottom {
    width: 100%;
    height: 20%;
  }
}
</style>
